1. Field of the Invention
The invention relates to an image processing apparatus, an image processing method, and an image processing program for detecting an area including at least a portion of an object, such as a person, included in image data.
2. Description of the Related Art
Detecting a portion, such as a human face or hands, from image data is an extremely important technique for ascertaining the posture or state of a person. The face or hands can be detected by means of a technique for acquiring, by any method, information about the skin color of the face or hands to be detected as a color distribution, to thus define an image area including the face or hands using the color distribution.
When, e.g., a hand area, is detected using the technique, a score value pertaining to a degree to which the hand area is included in image data is computed for each of pixels included in the image data on the basis of a color distribution of acquired skin color, thereby generating a map of scores in which positions of the respective pixels and scores are associated with each other. A hand area is detected using this map of scores.
A CAMSHIFT(Continuously Adaptive Mean Shift) algorithm is available as one technique for detecting an target area such as a hand area through use of a map of scores (see “Computer Vision Face Tracking For Use in a Perceptual User Interface” (Gary R. Bradski, et al., Intel Technology Journal Q2, (1998)). When this technique is adopted, a temporary area is first set on the map of scores. The position of the temporary area is shifted on the basis of the distribution of scores of the temporary area, and processing for changing the size of the temporary area is repeated, thereby determining a target area from a position on which the temporary area converges and the size of the temporary area.
However, according to the related-art technique, during detection of the target area, the position and size of the temporary area are changed in accordance with the distribution of scores in the temporary area. However, the shape of the temporary area is changed solely on the basis of the distribution of scores pertaining to an overall area which assumes the same shape as that of the temporary area and includes the temporary area. For this reason, the size of the temporary area is not changed on the basis of information about another area adjacent to the temporary area in a predetermined direction. Consequently, when the shape of an target area to be defined cannot be predicted in advance, there arise problems, such as a failure to detect the target area, or deterioration of detection accuracy. In the case of detection of, e.g., hand areas, when the photographed person is wearing a jacket with long sleeves and when the only skin exposed is that on the hands, the hand areas can be detected with comparatively-superior accuracy through use of skin color information. However, when the photographed person is wearing a jacket with short sleeves and skin of the entire arms is exposed, there may arise a case where correct detection of the hand areas ends in failure.
The present invention has been conceived under the circumstances, and provides an image processing apparatus, an image processing method, and an image processing program, which can improve detection accuracy in the case of detecting an area including at least a portion of an object, such as a person, included in image data.